<template>
    <div>
      <h2>{{count }}</h2>
      <button @click="increment">同步+</button>
    </div>
  </template>
  
  <script lang='ts' setup>
  import useCounterStore from '../store/useCounterStore';
  import {storeToRefs} from 'pinia'
  const store=useCounterStore()
  const {count}=storeToRefs(store)
  
  
  console.log('count',count);
  
  const increment=()=>{
    store.INCREMENT(2)
  }
  
  </script>
  
  <style lang='scss' scoped>
  </style>